home *** CD-ROM | disk | FTP | other *** search
/ CICA 1995 August / CICA - The Ultimate Collection of Shareware for Windows (Disc 2) (August 1995).iso / disc2 / patches / symantec / rtlinc.exe / STDARG.H < prev    next >
C/C++ Source or Header  |  1993-05-18  |  689b  |  29 lines

  1. /*_ stdarg.h   1993   Modified by: Walter Bright */
  2. /* ANSI C style variable arguments    */
  3.  
  4. #ifndef __STDARG_H
  5. #define __STDARG_H    1
  6.  
  7. #if __INTSIZE == 4
  8. #define __VA_ALIGN    3
  9. #else
  10. #define __VA_ALIGN    1
  11. #endif
  12.  
  13. /* Aligned size on stack */
  14. #define __va_size(type) ((sizeof(type) + __VA_ALIGN) & ~__VA_ALIGN)
  15.  
  16. #if 1
  17. #define __SS
  18. #else
  19. #define __SS    __ss
  20. #endif
  21.  
  22. typedef char __SS *va_list;
  23. #define va_start(ap,parmn) ((void)((ap) = (va_list)&(parmn)+__va_size(parmn)))
  24. /* #define va_arg(ap,type) (*((type __SS *)(ap))++) */
  25. #define va_arg(ap,type)       (*(type __SS *)(((ap)+=__va_size(type))-(__va_size(type))))
  26. #define va_end(ap)       ((void)0)
  27.  
  28. #endif /* __STDARG_H */
  29.